package com.hxzy.shop.order.dto.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author wxy
 * @Date 2021/5/25 10:16
 * @Version 1.0
 */
@Data
@ApiModel
public class WkGetPrescriptionResp implements Serializable {
    private static final long serialVersionUID = 8987274136257911761L;

    @ApiModelProperty(value = "处方总价")
    private Double amount;
    @ApiModelProperty(value = "处方总价 单位：元")
    private Double amountDecimal;
    @ApiModelProperty(value = "供应商 可否配送")
    private String canDelivered;
    @ApiModelProperty(value = "供应商 可否自提")
    private String canPack;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "处方生成时间")
    private Date createTime;
    @ApiModelProperty(value = "科室")
    private String department;
    @ApiModelProperty(value = "科室Id")
    private String departmentId;
    @ApiModelProperty(value = "疾病列表")
    private List<DiseaseEntity> diseaseEntities;
    @ApiModelProperty(value = "处方疾病中间表")
    private List<DiseasePrescriptionEntity> diseasePrescriptionEntities;
    @ApiModelProperty(value = "医生ID")
    private String doctorId;
    @ApiModelProperty(value = "医生姓名")
    private String doctorName;
    @ApiModelProperty(value = "开方医生签名原始报文")
    private String doctorSignatureBody;
    @ApiModelProperty(value = "医生抽成金额")
    private Integer drIncome;
    @ApiModelProperty(value = "处方有效至")
    private String effectiveTime;
    @ApiModelProperty(value = "医院id")
    private String hospitalId;
    @ApiModelProperty(value = "医院名称")
    private String hospitalName;
    @ApiModelProperty(value = "ID")
    private String id;
    @ApiModelProperty(value = "问诊ID")
    private String inquiryId;
    @ApiModelProperty(value = "病历ID")
    private String medicalRecord;
    @ApiModelProperty(value = "患者年龄")
    private Integer patientAge;
    @ApiModelProperty(value = "患者ID")
    private String patientId;
    @ApiModelProperty(value = "患者姓名")
    private String patientName;
    @ApiModelProperty(value = "患者性别")
    private String patientSex;
    @ApiModelProperty(value = "电子处方平台流水号 （His门诊收费接口返\n" +
            "回）")
    private String pcontrolResultNo;
    @ApiModelProperty(value = "药师ID")
    private String pharmacistId;
    @ApiModelProperty(value = "药师姓名")
    private String pharmacistName;
    @ApiModelProperty(value = "审方医生签名原始报文")
    private String pharmacistSignatureBody;
    @ApiModelProperty(value = "处方编号")
    private String prescriptionCode;
    @ApiModelProperty(value = "处方药品")
    private List<PrescriptionDrugEntitity> prescriptionDrugEntities;
    @ApiModelProperty(value = "处方来源")
    private String prescriptionSource;
    @ApiModelProperty(value = "开方医生时间戳")
    private String recipeDocTimeStamp;
    @ApiModelProperty(value = "退方的处方ID")
    private String recipeId;
    @ApiModelProperty(value = "退方的处方No")
    private String recipeNo;
    @ApiModelProperty(value = "审批备注")
    private String remark;
    @ApiModelProperty(value = "处方审核时间")
    private String reviewTime;
    @ApiModelProperty(value = "医生数字证书")
    private String signCertificate;
    @ApiModelProperty(value = "ID")
    private String signJobId;
    @ApiModelProperty(value = "医生签名时间")
    private String signTime;
    @ApiModelProperty(value = "医生数字签名值")
    private String signValue;
    @ApiModelProperty(value = "药师签名")
    private String signaturePharmacist;
    @ApiModelProperty(value = "医师签名url")
    private String signaturePhysiciansUrl;
    @ApiModelProperty(value = "签名时间")
    private String signatureTime;
    @ApiModelProperty(value = "处方状态")
    private String state;
    @ApiModelProperty(value = "供应商Id")
    private String supplierId;
    @ApiModelProperty(value = "供应商名")
    private String supplierName;
    @ApiModelProperty(value = "审方药师数字签名值")
    private String trialPharmSignatureValue;
    @ApiModelProperty(value = "审方药师数字证书")
    private String trialPharmSigncertificate;
    @ApiModelProperty(value = "审方医生时间戳")
    private String trialPharmTimeStamp;

    @Data
    @ApiModel
    public static class DiseaseEntity {
        @ApiModelProperty(value = "疾病编码")
        private String code;
        @ApiModelProperty(value = "疾病描述")
        private String description;
        @ApiModelProperty(value = "标准疾病编码")
        private String formatCode;
        @ApiModelProperty(value = "id")
        private String id;
        @ApiModelProperty(value = "简拼")
        private String inputCpy;
        @ApiModelProperty(value = "疾病名称")
        private String name;
        @ApiModelProperty(value = "订单编号")
        private String outTradeNo;
        @ApiModelProperty(value = "处方Id")
        private String prescriptionId;
        @ApiModelProperty(value = "疾病症状")
        private String symptom;
    }

    @ApiModel
    @Data
    public static class DiseasePrescriptionEntity {
        @ApiModelProperty(value = "疾病编码")
        private String diseaseCode;
        @ApiModelProperty(value = "疾病Id")
        private String diseaseId;
        @ApiModelProperty(value = "疾病名称")
        private String diseaseName;
        @ApiModelProperty(value = "id")
        private String id;
        @ApiModelProperty(value = "处方ID")
        private String prescriptionId;
    }


    @ApiModel
    @Data
    public static class PrescriptionDrugEntitity {
        @ApiModelProperty(value = "药品本位码")
        private String code;
        @ApiModelProperty(value = "用药天数")
        private String day;
        @ApiModelProperty(value = "处方药品")
        private String dividedTypes;
        @ApiModelProperty(value = "处方药品")
        private Integer doctorDivided;
        @ApiModelProperty(value = "单次用量")
        private String dosage;
        @ApiModelProperty(value = "开药量")
        private String dose;
        @ApiModelProperty(value = "药品ID")
        private String drugId;
        @ApiModelProperty(value = "药品名称")
        private String drugName;
        @ApiModelProperty(value = "生产厂商")
        private String factory;
        @ApiModelProperty(value = "id")
        private String id;
        @ApiModelProperty(value = "药品图片路径")
        private String imageUrl;
        @ApiModelProperty(value = "医保编码")
        private String insuranceCode;
        @ApiModelProperty(value = "是否处方药")
        private String isPrescription;
        @ApiModelProperty(value = "医保用药途径/用法")
        private String mbfMethod;
        @ApiModelProperty(value = "医保用药频次")
        private String mbfRate;
        @ApiModelProperty(value = "医保剂量单位")
        private String mbfUnit;
        @ApiModelProperty(value = "用法(口服，涂抹)")
        private String method;
        @ApiModelProperty(value = "用法（饭前，饭后）")
        private String methodType;
        @ApiModelProperty(value = "数量")
        private Integer num;
        @ApiModelProperty(value = "处方ID")
        private String prescriptionId;
        @ApiModelProperty(value = "单价")
        private Double price;
        @ApiModelProperty(value = "用药频次")
        private String rate;
        @ApiModelProperty(value = "退方hisID")
        private String rcpdetailid;
        @ApiModelProperty(value = "备注")
        private String remark;
        @ApiModelProperty(value = "供应商SKU")
        private String sku;
        @ApiModelProperty(value = "包装规格")
        private String standard;
        @ApiModelProperty(value = "药品总价")
        private Double totalAmount;
        @ApiModelProperty(value = "单位")
        private String unit;
        @ApiModelProperty(value = "药品单位")
        private String drugUnit;
    }
}
